package com.lsu.chain.experiment;

/**
 * 链式结构
 *
 * @Author wang suo
 * @Date 2020/11/26 0026 15:18
 * @Version 1.0
 */
public abstract class AbstractChain {
    private AbstractChain next;
    /**
     * 记录牌的面值最大的数是谁
     */
    private String max;
    private Integer num;

    public AbstractChain getNext() {
        return next;
    }

    public void setNext(AbstractChain next) {
        this.next = next;
    }

    public Integer getNum() {
        return next.num;
    }

    public void setNum(Integer num) {
        this.next.num = num;
    }

    public String getMax() {
        return max;
    }

    public void setMax(String max) {
        this.max = max;
    }

    /**
     * 处理请求
     *
     * @param request 请求对象
     */
    public abstract void handlerRequest(String[] request);
}
